<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        td{
            width: 100px;
            height: 100px;
        }
        img{
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
    
    <div id="app">

        <button @click="init">点击我</button>

        <table v-show="flag" border="1" cellspacing="0" cellpadding='0'>
            <tr>
                <th>id</th>
                <th>添加时间</th>
                <th>图片</th>
            </tr>
            <tr v-for="item in list" :key="item.id">
                <td>{{item.id}}</td>
                <td>{{item.addTime}}</td>
                <td>
                    <img :src="host + item.url">
                </td>
            </tr>
        </table>
    </div>

    <script src="../lib/Vue/vue.js"></script>
    <script src="../lib/jQuery/jquery.min.js"></script>
    <script>

        var vm = new Vue({
            el: '#app',
            data: {
                list: [],
                host: 'http://bufantec.com/',
                flag: false
            },
            methods: {
                init() {
                    // var _this = this;
                    this.flag = true;
                    $.ajax({
                        url: 'http://bufantec.com/api/test/user/fileList',
                        method: 'GET',
                        success: res => {
                            console.log(res);
                            this.list = res.data.list
                        }
                    })
                }
            },
        })
    </script>
</body>
</html>